// TypeScript（TS）是JavaScript（JS）的超集，增加了静态类型检查
//作业:":"后面能不能有更多类型的
let age1 = 18;
let name1: string = "zs";
let isOK: boolean;

console.log(typeof age1); 
console.log(typeof name1); 
console.log(name1.toUpperCase()); 

// age1 = "HELLO";
name1 = "list";
isOK = false;
// console.log(age1.toUpperCase()); 

function changeNameToUpper1(xxx: string) { 
    let a = xxx.toUpperCase();
    // console.log(a);
    return a;
}
let xx=function(a:number,b:number):number{
    return a+b
}
let mm=(a:number,b:number):number=>{
    return a+b
}
let yy: (a: number, b: number) => number = (a: number, b: number): number => {
    return a + b
} 
let result=yy(2,3)
console.log(result)

// 调用函数并接收返回值
let res3 = changeNameToUpper1(name1);
console.log(res3);

let res2 = changeNameToUpper1("hello");
console.log(res2);
